<div class="modal fade " id="auditCustScoreModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document" style="width:85%">
        <div class="box box-info">
            <input id="auditCustScoreId" type="hidden">
            <div class="box-header with-border">
                <h3 class="box-title">评审企业评分</h3>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <form class="form-horizontal">
                <div id="auditCustScoreBodyDiv" class="box-body">

                </div>
                <!-- /.box-body -->
                <div class="box-footer">
                    <button type="button" class="btn btn-success " onclick="pass()">通过</button>
                    <button type="button" class="btn btn-primary " onclick="reject()">驳回</button>
                    <button type="button" class="btn btn-default pull-right" data-dismiss="modal">关闭</button>
                </div>
                <!-- /.box-footer -->
            </form>
        </div>
    </div>
</div>
<script>
    function initAuditCustScore(html){
        $("#auditCustScoreBodyDiv").html("");
        html = html + "<section id=\"new\"><div class=\"col-xs-12\"><textarea id=\"auditMsg\" rows=\"2\" style=\"width: 100%\"></textarea></div></section>" ;
        $("#auditCustScoreBodyDiv").append(html);
    }
    function pass() {
        var id = $("#auditCustScoreId").val();
        var url = "/scoreaudit/pass";
        var data = {
            id: id
        };
        postReq(url, data, function (result) {
            if (result.success) {
                $("#custScoreTable").bootstrapTable("refresh");
                $("#auditCustScoreModal").modal("hide");
                toastr['success']('评审通过成功', '提示');
            } else {
                toastr['error'](result.msg, '提示');
            }
        });
    }
    function reject() {
        var id = $("#auditCustScoreId").val();
        var url = "/scoreaudit/reject";
        var data = {
            id: id,
            msg:$("#auditMsg").val()
        };
        postReq(url, data, function (result) {
            if (result.success) {
                $("#custScoreTable").bootstrapTable("refresh");
                $("#auditCustScoreModal").modal("hide");
                toastr['success']('驳回成功', '提示');
            } else {
                toastr['error'](result.msg, '提示');
            }
        });
    }
    function submitToAudit() {
        toastr['success']('提交评审成功', '提示');
    }
</script>